package com.yan.design.two.structure.s5;

/**
 * 5. 外观模式
 *     整合类
 * @author shengren.yan
 * @create 2022-07-31
 */
public class HomeFacade {

    private PoP pop;
    private DVD dvd;
    private Ster ster;

    public HomeFacade() {
        super();
        this.pop = PoP.getObj();
        this.dvd = DVD.getObj();
        this.ster = Ster.getObj();
    }


    // on
    public void allOn(){
        pop.on();
        dvd.on();
        ster.on();
    }

    // on
    public void allOff(){
        pop.off();
        dvd.off();
        ster.off();
    }


}
